package com.wyx.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.wyx.mapper.ArticleMapper;
import com.wyx.pojo.Article;
import com.wyx.pojo.MyPage;
import com.wyx.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public int insertArticle(Article article) {
        return articleMapper.insertArticle(article);
    }

    @Override
    public int deleteArticleById(int id) {
        return articleMapper.deleteArticleById(id);
    }

    @Override
    public int updateArticleById(Article article) {
        return articleMapper.updateArticleById(article);
    }

    @Override
    public List<Article> selectArticleByAll(Article article) {
        return articleMapper.selectArticleByAll(article);
    }

    @Override
    public List<Map<String,Object>> browseArticle() {
        return articleMapper.browseArticle();
    }
}
